package com.c.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.c.entity.Order;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * @author wangxiangli
 * @create 2022-12-31-12:17
 */
@Repository
public interface OrderMapper extends BaseMapper<Order> {

    //分页查询订单
    IPage<Map> findByPage(IPage<Map> page2, @Param("queryString") String queryString);
    //条件查询
    List<Order> findByCondition(Order order);
    //通过id查找订单
    Map findById4Detail(Integer id);
    //根据订单id连表查询用户信息
    Map findById(Integer id);
    //今日预约数
    Integer findOrderCountByDate(String today);
    //本周预约数
    Integer findOrderCountAfterDate(String thisWeekMonday);
    //今日到诊数
    Integer findVisitsCountByDate(String today);
    //本周到诊数
    Integer findVisitsCountAfterDate(String thisWeekMonday);
    //热门套餐查询
    List<Map> findHotSetmeal();
}
